
// 渲染详情页
(function(){
    let url = location.href
    let urlObj = getQueryString(url)
    console.log(urlObj);

    fetch('http://chst.vip:1234/api/getdiscountproduct?productid='+ urlObj.productid)
    .then(response => {
        return response.json()
    }).then(data => {
        let res = data.result[0]
        console.log(res);
        let ele = `
        <li>
            <div class="infor">
                <div class="title">
                    <h4>${res.productName}</h4>
                </div>
                <div class="other">
                    <span class="mall">${res.productFrom} | ${res.productTime}</span>
                    <i>${res.productTips}</i>
                    <div>${res.productPrice}</div>
                </div>
                <div class="container">
                    <div class="info2">
                        ${res.productInfo}
                    </div>
                    <p>
                        ${res.productImg}     
                </div>
                <div class="city">
                    <ul id="disstorck">
                        <li>

                        </li>
                    </ul>
                </div>
            </div>
        </li>
        `
        $('#info').html(ele)

    })
})();